//
// Unihan Input Method
//
// Copyright © 2002-2007 Sun Wah Linux Ltd.
//
//
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation; either version 2.1 of the
// License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
// USA
//
// $Id: unicode.h 793 2007-06-26 15:06:44Z roger $
//

#ifndef __UNICODE_H
#define __UNICODE_H

#include <iml/SunIM.h>

typedef unsigned long UTF32CHAR;
typedef unsigned char UTF8CHAR;

const UTF8CHAR *utf8_next_char(const UTF8CHAR *in);
UTFCHAR *utf8_to_utf16be(iml_session_t *s, const UTF8CHAR *utf8, unsigned int *num_chars);
UTF32CHAR *utf8_to_utf32(iml_session_t *s, const UTF8CHAR *utf8, unsigned int *num_chars);
UTF8CHAR *utf32_to_utf8(iml_session_t *s, const UTF32CHAR *utf32, unsigned int *num_chars);
UTF8CHAR *utf16be_to_utf8(iml_session_t *s, const UTFCHAR *utf16, unsigned int *num_chars);

#endif /* __UNICODE_H */

// vi:ts=4:sw=4:nowrap:cin:expandtab
